const Mock = require('mockjs')
// 饼图
const bingData = Mock.mock({
  'list': [{
    'id': '@id',
    title: '员工分布',
    'num|6': [{
      'name|+1': ['红','盼','军','杰','明','涛'],
      'value|1': [() => Mock.Random.integer(1, 10)]
    }]
  }]
})
// 柱状图
const zhuData = Mock.mock({
  'list': [{
    'id': '@id',
    subject: ['红','盼','军','杰','明','涛','小'],
    'score|7': [() => Mock.Random.integer(50, 200)]
  }]
})

const faData = Mock.mock({
  'list': {
    
      
      'score|4': [() => Mock.Random.integer(10, 80)]
    
   
  }
})

module.exports = [
  // 饼图接口
  {
    url: '/mock/bing',
    type: 'get',
    response: config => {
      return { success: true, message: '', data: bingData.list }
    }
  },
  // 柱状图
  {
    url: '/mock/zhuData',
    type: 'get',
    response: config => {
      return { success: true, message: '', data: zhuData.list }
    }
  },
  {
    url: '/mock/faData',
    type: 'get',
    response: config => {
      return { success: true, message: '', data: faData.list }
    }
  },
  
]
